<template>
<uni-shadow-root class="partials-activitiesGoods-pupuPromotionDetailList-index"><template name="pupuPromotionDetailList">
<block>
  <view class="pupu_promotion_detail_top">
    <text class="pupu_promotion_detail_name">{{relateBean.name}}</text>
    <view class="pupu_promotion_detail_right">
      <view class="pupu_promotion_detail_time">
        <text class="pupu_promotion_detail_time_title">{{relateBean.promotionStatus==0?"抢购开始倒计时:":"抢购结束倒计时:"}}</text>
        <view class="pupu_promotion_detail_time_value" v-if="relateBean.promotionStatus!=2">
          <view class="pupu_promotion_detail_time_value_item_value"> <text>{{countDownDay}}/D</text></view>
          <view class="colon"> <text></text></view>
          <view class="pupu_promotion_detail_time_value_item_value"> <text>{{countDownHour}}</text></view>
          <view class="colon"> <text>:</text></view>
          <view class="pupu_promotion_detail_time_value_item_value"> <text>{{countDownMinute}}</text></view>
          <view class="colon"> <text>:</text></view>
          <view class="pupu_promotion_detail_time_value_item_value"> <text>{{countDownSecond}}</text></view>
        </view>
        <view class="over_promotion" v-else>活动已结束</view>
        <view class="pupu_promotion_detail_more" @click="clickLink1" :data-id="relateBean.id">
          <text class="pupu_promotion_detail_more_text">更多</text>
          <image class="pupu_promotion_detail_more_icon" src="https://image1.sansancloud.com/xianhua/2019_4/3/18/3/24_160.jpg?x-oss-process=style/preview_120"></image>
        </view>
      </view>
    </view>
  </view>
  <view class="pupu_promotion_detail_list">
    <view v-for="(result,index) in (relateBean.products)" :key="result.index" class="product_items3" @click="clickLink" :data-id="result.id" :data-index="result.id">
        <view class="product_items3_promotion_name" v-if="result.tagArray[0]">{{result.tagArray[0]}}</view>
        <image class="product_items3_img" mode="aspectFill" :src="(result.imagePath)+'?x-oss-process=style/preview'"></image>
        <view class="product_items3_view1">
          <text class="product_name">{{result.name}}</text>
          <text class="location_name" v-if="result.longitude>0">{{result.location}}</text>
          <text class="location_name" v-else>{{result.description}}</text>
          <view class="sale_item3" :style="'border:1rpx solid '+(setting.defaultColor)" v-if="result.itemSpecialSaleType!=0">
            <view class="sale_item3_title" :style="'background:'+(setting.defaultColor)">
              <text v-if="result.itemSpecialSaleType==1">满减</text>
              <text v-if="result.itemSpecialSaleType==2">买赠</text>
              <text v-if="result.itemSpecialSaleType==3">限购</text>
            </view>
            <view class="sale_item3_value" v-if="result.itemSpecialSaleType==1" :style="'color:'+(setting.defaultColor)">
              满<text>{{result.itemSpecialSaleValue1}}元</text>减<text>{{result.itemSpecialSaleValue2}}元</text>
            </view>
            <view class="sale_item3_value" v-if="result.itemSpecialSaleType==2" :style="'color:'+(setting.defaultColor)">
              买<text>{{result.itemSpecialSaleValue1}}</text>赠<text>{{result.itemSpecialSaleValue2}}</text>
            </view>
            <view class="sale_item3_value" v-if="result.itemSpecialSaleType==3" :style="'color:'+(setting.defaultColor)">
              限购<text>{{result.itemSpecialSaleValue1}}件</text>
            </view>
          </view>
          <text class="location_name">{{result.unitShow}}</text>
          <view class="product_price">
            <text class="price" v-if="result.promotion>0">￥{{result.promotionPrice}}</text>
            <text class="price" v-else>￥{{result.price}}</text>
            <text class="price" v-if="result.maxPrice>result.price">-{{result.maxPrice}}</text>
            <text v-if="result.maxPrice<=result.price&&result.tagPrice>result.price" class="tag_price">￥{{result.tagPrice}}</text>
          </view>
        </view>
        <view class="to_car3" :style="'background:'+(defaultColor)" v-if="jsonData.showCard==1" @click.stop.prevent="readyAddCar" :data-product="result">
          <image v-if="result.promotion==0" class="to_car3_icon" src="https://image1.sansancloud.com/xianhua/2019_3/20/10/45/42_450.jpg?x-oss-process=style/preview_120"></image>
          <text style="font-size:24rpx;padding:0rpx 10rpx;" v-if="result.promotion!=0">立即抢购</text>
          <text class="to_car3_text" v-else>选购</text>
        </view>
      </view>
  </view>
</block>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/activitiesGoods/pupuPromotionDetailList/index'

Component({})

export default global['__wxComponents']['partials/activitiesGoods/pupuPromotionDetailList/index']
</script>
<style platform="mp-weixin">
.pupu_promotion_detail_top{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding:30rpx;
  border-bottom:1rpx solid #f6f6f6;
  box-sizing:border-box;
  overflow: hidden;
}
.pupu_promotion_detail_name{
  font-size: 30rpx;
  width: 22%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  box-sizing: border-box;
  font-weight:bold;
}
.pupu_promotion_detail_right{
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 76%;
  box-sizing: border-box;
}
.pupu_promotion_detail_time{
  display: flex;
  align-items: center;
  flex-direction: row;
  width: 100%
}
.pupu_promotion_detail_time_title{
  font-size: 26rpx;
  color: #999;
  margin-right: 10rpx;
}
.pupu_promotion_detail_time_value{
  display: flex;
  flex-direction: row;
  align-items: center;
  color: #fff;
  font-size: 26rpx;
  background: #666666;
  border-radius: 30rpx;
  padding:0 16rpx;
}
.pupu_promotion_detail_more{
  display: flex;
  flex-direction: row;
  font-size: 28rpx;
  align-items: center;
  margin-left: 30rpx;
}
.pupu_promotion_detail_more_text{
  margin-right: 10rpx;
  color: #999999;
}
.colon{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin:0 2rpx;
}
.pupu_promotion_detail_more_icon{
  width: 12rpx;
  height: 24rpx
}
.pupu_promotion_detail_list{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}
.product_items3{
  padding: 10px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background: #fff;
  border-bottom: 1px solid #f1f1f1;
  min-height:120rpx; 
  position: relative;
}
.product_items3_promotion_name{
  display: flex;
  flex-direction: row;
  align-items: center;
  position: absolute;
  top: 19rpx;
  left: 19rpx;
  font-size: 20rpx;
  background: #eb7aa4;
  padding: 2rpx 6rpx;
  color: #fff;
}
.product_items3_img{
  width: 220rpx;
  height: 220rpx;
}
.product_items3 .product_items3_view1{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin-left: 20rpx;
  min-height:220rpx;
  width:470rpx;
}
.product_items3_view1 .tags_content{
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow-x:hidden;
  width:100%;
  height:50rpx;
  white-space: nowrap
}
.location_name{
  color: #aaa;
  font-size: 24rpx;
  overflow:hidden; 
  text-overflow:ellipsis;
  white-space:nowrap; 
  width:100%;
}
.product_name{
  color: #555;
  font-size: 32rpx;
  font-weight: 500;
  overflow:hidden; 
  text-overflow:ellipsis;
  white-space:nowrap; 
  width:100%;
}
.product_price{
  margin-left: -6rpx;
  font-size: 38rpx;
  color: #ff0000;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}
.product_items3_view1 .tags_item{
  border: 2rpx solid #eee;
  padding: 2rpx 12rpx;
  font-size: 22rpx;
  color: #888;
  margin-right: 10rpx;
  border-radius: 4rpx;
  white-space:nowrap;
  box-sizing: content-box
}
.unitShow{
  color:#bbb;
  font-size:24rpx;
  margin-left:4rpx;
  letter-spacing:4rpx;
}
.tag_price{
  text-decoration:line-through;
  font-size: 24rpx;
  color:#bbb;
  margin-left: 6rpx;
}
.price{
  font-size: 38rpx;
  height:38rpx;
  line-height:38rpx;
  color: #ff826e;
}
.to_car3{
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  bottom: 20rpx;
  right: 26rpx;
  border-radius: 24rpx;
  font-size: 20rpx;
  color: #fff;
  padding: 4rpx 6rpx;
}
.to_car3_icon{
  width: 30rpx;
  height: 30rpx;
  margin-right:10rpx;
}
.to_car3_text{
  letter-spacing: 12rpx;
  font-size:22rpx;
}
.sale_item3{
  display: flex;
  align-items: center;
  flex-direction: row;
  font-size: 20rpx;
}
.sale_item3_title{
  color: #fff;
  padding:2rpx 6rpx;
  background: #ff5959;
}
.sale_item3_value{
  padding:2rpx 10rpx;
  background: #f5f5f5;
  color: #ff5959;
}
.over_promotion{
  font-size: 30rpx;
  color: #eb7aa4;
  width: 42%;
  text-align: center
}
</style>